﻿<!doctype html>
<html>
<head>
    <meta charset="utf-8" />
    <title>文件上传</title>
    <!--link to style-->
    <link rel="stylesheet" href="css/adapt.css" />
    <!--  
    <link rel="stylesheet" href="../css/bootstrap.min.css" />
    -->
    <link rel="stylesheet" href="../../static/css/font-awesome.min.css" />
    <!--<link rel="stylesheet" href="css/adapt.css" />-->
    <!--//End link to style-->
    <script type="text/javascript" src="../js/jquery.js"></script>
</head>
<body>
    <div class="Body clearfix">
        <div class="catlog">
            <span class="cat_block">当前位置</span>
            <span class="cat_block icon-chevron-right">文件记录</span>
            <span class="cat_block icon-chevron-right">文件上传</span>
        </div>
        <div class="archt">
            <form name="formupload" action="/hr_doc/servlet/DocumServlet?Command=upload" method="POST" enctype="multipart/form-data" >
                
                <input class="atc_input" type="text" name="Command" value="upload" hidden="hidden" />
                <div class="layui-form-item">
                    <label for="link" class="layui-form-label">
                        <span class="x-red">*</span>上传文件
                    </label>
                    <input type="file" id="file" name="file"/>
                </div>

                <div class="arc_line">
                    <span class="arc_tit">上传文件名：</span>
                    <input class="atc_input" type="text" name="filename" readonly="readonly" id="filename"/>
                </div>
                <div class="arc_line">
                    <span class="arc_tit">上传文件大小：</span>
                    <input class="atc_input" type="text" name="filesize" readonly="readonly" id="filesize"/>单位(KB)
                </div>
                <div class="arc_line">
                    <span class="arc_tit">上传文件格式：</span>
                    <input class="atc_input" type="text" name="filetype" readonly="readonly" id="filetype" />
                </div>
                <div class="arc_line">
                    <span class="arc_tit">上传文件类型：</span>
                    <input class="atc_input" type="text" name="format" id="format"/>
                </div>
                <input class="submit" type="submit" value="提交"/>
            </form>
        </div>

    </div>



    <script>
        function recheck() {

        }
        $("#file").change(function(e){
        	
        	var file = document.getElementById("file").files[0];
        	if (typeof (file) == "undefined" || file.size <= 0) {
                alert("请选择文件");
                return;
            }
        	$("#filesize").val((file.size/1024).toFixed(2));
        	$("#filetype").val(file.type);        	
        	$("#filename").val(file.name);
        	
        });
    </script>
</body>
</html>